<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    // var obj = {};

    // obj.name = "admin";
    // obj["age"] = 18;

    // console.log(obj.age);
    // console.log(obj.name);
    // console.log(obj["name"]);

    // obj.name = "root";
    // obj.age = 19;
    // obj["age"] = 20;

    // console.log(obj.name);

    // delete obj.name;
    // // delete obj["age"];
    // delete obj.age;

    // console.log(obj.name);

    // console.log(obj);

    // =========

    // var obj1 = {
    //     name:"admin"
    // }
    // obj1.age = 19;
    // obj1.sex = "男";
    // obj1.key = "hello"

    // var key = "sex";

    // console.log(obj1.key);
    // console.log(obj1["key"]);
    // console.log(obj1[key]);

    // console.log(obj1);

    // ========


    var obj2 = new Object();

    obj2.name = "admin";
    obj2.age = 20;
    obj2["sex"] = "男";

    console.log(obj2);
    
</script>
</html>